﻿<controls:ChildWindow
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:DataModel="clr-namespace:caedisi.Web.DataModel" xmlns:Services="clr-namespace:caedisi.Web.Services" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" mc:Ignorable="d" x:Class="caedisi.Views.ShowRecordedStates"
           Width="600" Height="400" 
           Title="ShowRecordedStates">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" />
        <Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="1" />
        <riaControls:DomainDataSource x:Name="recordStateDomainDataSource" AutoLoad="True" Height="0" LoadedData="recordStateDomainDataSource_LoadedData_1" QueryName="GetRecordStatesQuery" Width="0" d:DesignData="{d:DesignInstance DataModel:RecordState, CreateList=true}">
            <riaControls:DomainDataSource.DomainContext>
                <Services:RecordStateDomainServices/>
            </riaControls:DomainDataSource.DomainContext>
        </riaControls:DomainDataSource>
        <sdk:DataGrid x:Name="recordStateDataGrid" AutoGenerateColumns="False" ItemsSource="{Binding Data, ElementName=recordStateDomainDataSource}" RowDetailsVisibilityMode="VisibleWhenSelected" IsReadOnly="True">
            <sdk:DataGrid.Columns>
                <sdk:DataGridTextColumn x:Name="cellularAutomataNameColumn" Binding="{Binding CellularAutomataName}" Header="Cellular Automata Name" Width="288"/>
                <sdk:DataGridTextColumn x:Name="recordDescriptionColumn" Binding="{Binding RecordDescription}" Header="Record Description" Width="288"/>
            </sdk:DataGrid.Columns>
        </sdk:DataGrid>

    </Grid>
</controls:ChildWindow>